כֹּ֤ה אָמַר֙ יְהוָ֣ה צְבָא֔וֹת פָּקַ֕דְתִּי אֵ֛ת אֲשֶׁר־עָשָׂ֥ה עֲמָלֵ֖ק לְיִשְׂרָאֵ֑ל אֲשֶׁר־שָׂ֥ם לוֹ֙ בַּדֶּ֔רֶךְ בַּעֲלֹת֖וֹ מִמִּצְרָֽיִם׃
אַזױ האָט געזאָגט גאָט פֿון צבֿאות. איך געדענק װאָס עַמָלק האָט געטאָן צו ישׂראל, װי ער האָט זיך אים געשטעלט אין װעג בײַ זײַן אַרױפֿגײן פֿון מצרַיִם.
Mishneh Torah, Prayer and the Priestly Blessing
When the first day of the month of Adar falls on a Sabbath, the section concerning the Half Shekel (Exodus 30:11-16) is read; and the lesson from the Prophets is that relating to Jehoiadah the Priest (II Kings 11:17-12:17). When the first of Adar falls on a weekday, even on a Friday, the section concerning the Half-Shekel is read on the previous Sabbath. On the second Sabbath of the month, the section commencing "Remember" (Deuteronomy 25:17-19) is read. The lesson from the Prophets is that beginning, "I remember that which Amalek did to Israel" (I Samuel 15:1-34). What is meant by the second Sabbath? It is the Sabbath preceding the week in which the Feast of Lots occurs, even if that falls on Friday. On the third Sabbath, the section concerning the Red Heifer (Numbers 19:1-22) is read. The lesson from the Prophets is that containing the verse, "And I will sprinkle upon you" (Ezekiel 36:16-36). What is meant by the third Sabbath? That immediately preceding the fourth. On the fourth Sabbath, the section beginning, "This month" (Exodus 12:1-20) is read. The lesson from the Prophets is that beginning "In the first month, on the first day of the month (Ezekiel 45:18-46:15). The fourth Sabbath is that beginning the week in which the first of Nissan occurs, even if it falls on Friday.
Arukh HaShulchan
On the second Shabbat, the one before Purim, we read Parshat Zakhor. And many decisors think that Parshat Zakhor is a Torah commandment, meaning that there is an obligation from the Torah to read the Parshah of the annihilation of Amalek once a year. However in the times of Mordekhai and Esther, they fixed this obligation to be on the Shabbat before Purim, to make the annihilation of Amalek adjacent to the fall of Haman, as I have written. And it is written (Esther 9:28), "these days are recalled and observed" - one must have the memory of Amalek precede the doing of the commandment of Purim. And there is someone (Magen Avraham 685) that says that one fulfills the Torah obligation also with the reading on Purim of "And Amalek came" (Exodus 17:8-16). But in my humble opinion, it is not so. For behold the Rambam wrote in the Sefer HaMitzvot, Positive Commandment 188 that we were commanded to cut off the descendants of Amalek, etc. And in Commandment 189, he wrote that we were commanded to remember that which Amalek did to us, see there. But that is only mentioned in Parshat Zakhor (Deuteronomy 25:17-19): Remember what Amalek perpetrated against you... When you are rested... you shall obliterate..." Whereas in "And Amalek came," neither the commandment for the community of Israel of remembering nor the commandment of obliteration is written. As there it is written (Exodus 17:14), "for I will surely obliterate..."; but it is not written, "you shall obliterate," that we are obligated to do this. And also in Megillah (18a), it clearly implies that the central obligation is with Parshat Zakhor, as it teaches: "Remember," perhaps [it suffices] in his heart. That is why we learn to say, "You shall not forget" - behold that is already referring to forgetting from the heart. How, then, do I uphold "remember?" With the mouth. See there. Hence the obligation is only [dealt with] in Parshat Zakhor. However it is certainly the case that when one reads from Parshat Ki Tetzeh, he has fulfilled the Torah law. However it is a rabbinic decree that it should be specifically before Purim. And the haftara of Parshat Zakhor is in I Samuel (15), "I have remembered what Amalek perpetrated..." until, "the mountain of Shaul." And there are some that begin one verse earlier, "And Shumel said to Shaul," since that is the beginning of the section.